package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.ChatLog;
import com.ruoyi.system.domain.ChatMessages;
import com.ruoyi.system.domain.TemplateChat;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ChatLogMapper {

    /**
     * 查询聊天列表
     *
     * @param chatLog 查询条件
     * @return 聊天列表
     */
    List<ChatLog> selectChatLogList(ChatLog chatLog);

    /**
     *
     * @param chatLog
     * @return
     */
    List<ChatLog> selectChatByMaxTime(ChatLog chatLog);


    /**
     *
     * @param customerNumber
     * @param clientNumber
     * @return
     */
    List<ChatLog> selectChatLog(String customerNumber, String clientNumber);

    /**
     *
     */
    List<ChatLog> selectChatLogByUserType(ChatLog chatLog);

    List<ChatLog> selectChatByTranslateText();

    int updateChatLogForTranslateText(ChatLog chatLog);

    //selectChatLogByChatType
    List<ChatLog> selectChatLogByChatType(@Param("clientNumber") String clientNumber, @Param("limit") int limit);


    List<ChatLog> selectChatLogByChat(@Param("clientNumber") String clientNumber, @Param("limit") int limit);

    List<ChatLog> selectChatByCreateTime();

    List<ChatMessages> getMessagesByFansId(String clientNumber);


    int updateChatLogForTranslateTextBymsgId(ChatLog chatLog);
}
